home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Whiteline: delta
/
whiteline CD Series - delta.iso
/
progtool
/
modula2
/
module
/
mbio.mod
< prev
next >
Wrap
Text File
|
1995-11-25
|
2KB
|
110 lines
IMPLEMENTATION MODULE MBIO;
FROM InOut IMPORT OpenOutput,WriteInt,CloseOutput,WriteLn,
OpenInput,CloseInput,ReadInt,Done;
FROM Liste IMPORT MakeList,List,Next,GetValue,First,AtLast,Empty,EnterElement,
AppendElement,SetValue,KillList;
FROM MindMach IMPORT FrequenzGangARRAY,Change;
VAR ResultArray: FrequenzGangARRAY;
(*VAR MBList :List;*)
PROCEDURE LoadList;
VAR i,InPut:INTEGER;
s:ARRAY [0..255] OF CHAR;
BEGIN
s:='*.DAT';
OpenInput(s);
IF Done THEN
KillList(MBList);
MakeList(MBList);
END(*IF*);
WHILE Done DO
i:=1;
REPEAT
ReadInt(InPut );
ResultArray[i]:=InPut;
i:=i+1;
UNTIL (i>7) OR ~Done;
IF Done THEN
AppendElement(MBList);
SetValue(MBList,ResultArray);
END(*IF*);
END(*WHILE*);
CloseInput;
END LoadList;
PROCEDURE MergeList;
VAR i,InPut:INTEGER;
s:ARRAY [0..255] OF CHAR;
BEGIN
s:='*.DAT';
OpenInput(s);
WHILE Done DO
i:=1;
REPEAT
ReadInt(InPut );
ResultArray[i]:=InPut;
i:=i+1;
UNTIL (i>7) OR ~Done;
IF Done THEN
EnterElement(MBList);
SetValue(MBList,ResultArray);
Next(MBList);
END(*IF*);
END(*WHILE*);
CloseInput;
END MergeList;
PROCEDURE SaveList;
VAR I:INTEGER;
s:ARRAY [0..255] OF CHAR;
BEGIN
s:='*.DAT';
OpenOutput(s);
IF Done THEN
First(MBList);
Done:=GetValue(MBList,ResultArray);
FOR I:=1 TO 7 DO
WriteInt(ResultArray[I],5);
END(*FOR*);
WriteLn;
REPEAT
Next(MBList);
Done:=GetValue(MBList,ResultArray);
FOR I:=1 TO 7 DO
WriteInt(ResultArray[I],5);
END(*FOR*);
WriteLn;
UNTIL ~Done OR AtLast(MBList);
END(*IF*);
CloseOutput;
END SaveList;
PROCEDURE RunExtern;
BEGIN
First(MBList);
Done:=GetValue(MBList,ResultArray);
IF Done THEN
Change(ResultArray);
END(*IF*);
REPEAT
Next(MBList);
Done:=GetValue(MBList,ResultArray);
IF Done THEN
Change(ResultArray);
END(*IF*);
UNTIL ~Done OR AtLast(MBList);
END RunExtern;
BEGIN
MakeList(MBList)
END MBIO.